import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export const store=new Vuex.Store({
    state: {
        getTicket: localStorage.getItem('ticket'),
        getOrderid:'',
        getBytype:'',
        getContentText:'',
        getTextNobtn:'',
        getCutType:''
    },
    mutations:{
        increment(state,tick){
            state.getTicket=tick;
            return state
        },
        setCutType(state,tick){
            state.getCutType=tick.cutType;
            return state
        },
        orderStatus(state,tick){
            state.getOrderid=tick.orderid;
            state.getBytype=tick.type;
            state.getContentText=tick.contentText;
            state.getTextNobtn=tick.textNobtn;
            return state
        }
    }
})